package com.atguigu.gmall.item.vo;

import com.atguigu.gmall.pms.entity.CategoryEntity;
import com.atguigu.gmall.pms.entity.SkuImagesEntity;
import com.atguigu.gmall.pms.vo.ItemGroupVo;
import com.atguigu.gmall.pms.vo.SaleAttrValueVo;
import com.atguigu.gmall.sms.vo.ItemSaleVo;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

@Data
public class ItemVo {

    // 一二三级分类  V    O
    private List<CategoryEntity> categories;
    // 品牌   V   O
    private Long brandId;
    private String brandName;
    // spu信息    V   O
    private Long spuId;
    private String spuName;

    // 基本信息 V       O
    private Long skuId;
    private String title;
    private String subtitle;
    private String defaultImage;
    private BigDecimal price;
    private Integer weight;
    // sku图片列表  V   O
    private List<SkuImagesEntity> images;
    // 营销信息 V   O
    private List<ItemSaleVo> sales;
    // 是否有货 V   O
    private Boolean store = false;

    // 销售属性列表（同一个spu下所有sku的）    V   O
    // [{attrId: 3, attrName: 机身颜色, attrValues: ['暗夜黑', '白天白']}，
    // {attrId: 4, attrName: 运行内存, attrValues: ['8G', '12G']}，
    // {attrId: 5, attrName: 机身存储, attrValues: ['256G', '512G']}]
    private List<SaleAttrValueVo> saleAttrs;

    // 当前sku的销售属性   V
    // {3: '白天白', 4: '8G', 5: '512G'}
    private Map<Long, String> saleAttr;

    // 销售属性组合与skuId的映射关系：   V
    // {'白天白,8G,256G': 100, '白天白,12G,512G': 101}
    private String skuJsons;

    // 商品详情 V
    private List<String> spuImage;

    // 规格参数分组 V
    private List<ItemGroupVo> groups;
}
